/**
 * Dear programmer:
 * When I wrote this code, only god and I knew how it worked.
 * Now, only god knows it!
 *
 * @author: Pegasus  Date: 2018-11-29 Time: 23:01
 *
 * 物品列表排序
 */

import React, {Component} from 'react';
import {
  SafeAreaView,
  ScrollView
} from 'react-native';
import GoodsAndCountView from "../../GuestPreference/component/GoodsAndCountView"

export default class GoodsItemOrderScreen extends Component {
  static navigationOptions = {
    title: '物品排序'
  };

  render() {
    return (
      <SafeAreaView style={{flex: 1}}>
        <ScrollView style={{flex: 1}}>
          {
            this.props.navigation.state.params.data.map((item, index) => {
              return (
                <GoodsAndCountView key={index} index={index} name={item.name} count={item.count}/>
              )
            })
          }
        </ScrollView>
      </SafeAreaView>
    )
  }
}